<?php
$session=new CHttpSession();
$session->open();
$i=$session['i'];


if(isset($data->superuser) && $data->superuser==1){
    //管理员
    $user_title='管理员';
}
elseif($data->p->type_pg==1 && in_array($data->p->type_p_vasn, array(1,2,3,4))){
    //个人会员
    if($data->p->type_p_vasn==1){
        //尊贵会员
        $user_title='尊最会员';

    }elseif($data->p->type_p_vasn==2) {
        //高级会员
        $user_title='高级会员';

    }elseif($data->p->type_p_vasn==3) {
        //普善会员
        $user_title='普善会员';

    }elseif($data->p->type_p_vasn==4) {
        //晋学会员
        $user_title='晋学会员';
    }
}
elseif($data->p->type_pg==2 && in_array($data->p->type_g_pebg, array(1,2,3,4))){
    //团体会员会员
    if($data->p->type_g_pebg==1){
        //公共机构
        $user_title='公共机构';

    }elseif($data->p->type_g_pebg==2) {
        //学校教育
        $user_title='学校教育';

    }elseif($data->p->type_g_pebg==3) {
        //公司企业
        $user_title='公司企业';

    }elseif($data->p->type_g_pebg==4) {
        //其他团体
        $user_title='其他团体';

    }
}
?>
<form method="post">
    <tr<?php echo $i%2==1 ? '': ' class="tr1"'; ?>>
        <td align="center" class="td1<?php echo $i%2==1 ? '': ' td2'; ?>">
            <a href="/index.php?r=users/index&id=<?php echo $data->id;?>">
                <?php echo $data->p->type_pg==1?'spcf':'';?><?php echo $data->username;?>
            </a>
        </td>
        <td align="center" class="ms td1<?php echo $i%2==1 ? '': ' td2'; ?>"><?php echo $data->p->nickname;?></td>
        <td align="center" class="ms td1<?php echo $i%2==1 ? '': ' td2'; ?>"><?php echo isset($user_title) ? $user_title : '';?></td>
        <td align="center" class="ms td1<?php echo $i%2==1 ? '': ' td2'; ?>"><?php echo $data->p->nickname;?></td>
        <td align="center" class="ms td1<?php echo $i%2==1 ? '': ' td2'; ?>">
            <?php echo isset($data->pay->year) ? $data->pay->year.'年':'未提交';?>
        </td>
        <td align="center" class="ms td1<?php echo $i%2==1 ? '': ' td2'; ?>">
            <?php echo isset($data->pay->money) ? $data->pay->money.'元':'未提交';?>
        </td>
        <td align="center"<?php echo $i%2==1 ? '': ' class="td2"'; ?>>
            <?php echo isset($data->pay->post_time) ? date("Y-m-d", $data->pay->post_time):'';?>
        </td>
        <td align="center"<?php echo $i%2==1 ? '': ' class="td2"'; ?>>
            <?php echo isset($data->pay->status) && $data->pay->status==1 ? '已确认' : '未确认';?>
        </td>
    </tr>
</form>
<?php
$session['i']=$i+1;
?>